package com.tg.sieve_data.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tg.sieve_data.entity.ChannelDistributor;
import com.tg.sieve_data.entity.VisitRecord;
import com.tg.sieve_data.mapper.ChannelDistributorMapper;
import com.tg.sieve_data.service.ChannelDistributorService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChannelDistributorServiceImpl extends ServiceImpl<ChannelDistributorMapper, ChannelDistributor> implements ChannelDistributorService {
    @Override
    public Page<ChannelDistributor> getAll(ChannelDistributor channelDistributor, Integer pageNum, Integer pageSize) {
        Page<ChannelDistributor> page = new Page<>(pageNum, pageSize);
        List<ChannelDistributor> records = this.baseMapper.getAll(page, channelDistributor);
        page.setRecords(records);
        return page;
    }
}
